package com.atguigu.gulimall.order.web;

import com.atguigu.gulimall.order.service.OrderPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Description
 * @Author lhj
 * @Date 2024/5/25 11:11
 */
@Controller
@RequestMapping("/order/order")
public class OrderPayController {
    
    @Autowired
    OrderPayService orderPayService;

    /**
     * 订单支付
     * @param orderSn 订单号
     * @return 支付页面
     */
    @ResponseBody
    @GetMapping(value = "/orderPay.html", produces = MediaType.TEXT_HTML_VALUE)
    public String orderPay(@RequestParam(value = "orderSn") String orderSn) {
        return orderPayService.orderPay(orderSn);
    }
    
    
}
